home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Sapphire Collection / Software Vault (Sapphire Collection) (Digital Impact).ISO / cdr47 / ibrary30.zip / DEMO.ASI < prev    next >
Text File  |  1994-02-21  |  4KB  |  166 lines

  1. REM  +----------------------------------------------------------------------+
  2. REM  |                                                                      |
  3. REM  |         IBRARY  Copyright (c) 1993-1994  Thomas G. Hanlin III        |
  4. REM  |                                                                      |
  5. REM  +----------------------------------------------------------------------+
  6.  
  7.  
  8. REM  ----- Tell 'em what we're about ----------------------------------------
  9.  
  10.  
  11.    CLS
  12.    CALL SUB "PopWindow" 0 0 17 72 1 31 "IBRARY"
  13.    COLOR 7, 1
  14.    LOCATE 2, 2
  15.    PRINT "This brief demo provides an example of how to use the IBRARY library,"
  16.    LOCATE 3, 2
  17.    PRINT "a large collection of routines written for use with 80/20 Software's"
  18.    LOCATE 4, 2
  19.    PRINT "ASIC compiler.  It shows the use of a few of the equipment detection"
  20.    LOCATE 5, 2
  21.    PRINT "routines included with Ibrary."
  22.  
  23.  
  24. REM  ----- Display processor type -------------------------------------------
  25.  
  26.  
  27.    LOCATE 7, 2
  28.    CALL SUB "Processor" ProcType
  29.    COLOR 14, 1
  30.    PRINT "Processor     : ";
  31.    COLOR 7, 1
  32.    IF ProcType = 1 THEN
  33.       PRINT "8088";
  34.    ELSE
  35.       ProcType = ProcType - 1
  36.       CALL SUB "StrNB" ProcType St$
  37.       PRINT "80";
  38.       PRINT St$;
  39.       PRINT "86";
  40.    ENDIF
  41.  
  42.    CALL SUB "ProcSpeed" ProcSpeed
  43.    PRINT " at ";
  44.    CALL SUB "StrNB" ProcSpeed St$
  45.    PRINT St$;
  46.    PRINT " MHz"
  47.  
  48.    LOCATE 8, 2
  49.    CALL SUB "NumProc" NumProcType
  50.    COLOR 14, 1
  51.    PRINT "Coprocessor   : ";
  52.    COLOR 7, 1
  53.    IF NumProcType = 0 THEN
  54.       PRINT "none"
  55.    ELSE
  56.       IF NumProcType = 1 THEN
  57.          PRINT "8087"
  58.       ELSE
  59.          CALL SUB "StrNB" NumProcType St$
  60.          PRINT "80";
  61.          PRINT St$;
  62.          PRINT "87"
  63.       ENDIF
  64.    ENDIF
  65.  
  66.  
  67. REM  ----- Display drive info -----------------------------------------------
  68.  
  69.  
  70.    LOCATE 9, 2
  71.    CALL SUB "GetDrive" Drive$
  72.    COLOR 14, 1
  73.    PRINT "Default drive : ";
  74.    COLOR 7, 1
  75.    PRINT Drive$;
  76.    PRINT ":"
  77.  
  78.    LOCATE 10, 2
  79.    CALL SUB "Floppies" Floppies
  80.    COLOR 14, 1
  81.    PRINT "Floppy drives : ";
  82.    COLOR 7, 1
  83.    CALL SUB "StrNB" Floppies St$
  84.    PRINT St$
  85.  
  86.  
  87. REM  ----- Display video adapter type ---------------------------------------
  88.  
  89.  
  90.    LOCATE 11, 2
  91.    CALL SUB "GetDisplay" Adapter, Mono
  92.    tmp = Adapter * 4
  93.    tmp = tmp - 3
  94.    St$ = MID$("MDA HercCGA EGA MCGAVGA ", tmp, 4)
  95.    St$ = RTRIM$(St$)
  96.    IF Mono = 0 THEN
  97.       St$ = St$ + " on a color monitor"
  98.    ELSE
  99.       St$ = St$ + " on a monochrome monitor"
  100.    ENDIF
  101.    COLOR 14, 1
  102.    PRINT "Display       : ";
  103.    COLOR 7, 1
  104.    PRINT St$
  105.  
  106.  
  107. REM  ----- Display cursor status --------------------------------------------
  108.  
  109.  
  110.    LOCATE 12, 2
  111.    CALL SUB "CursorInfo" Visible, StartLine, EndLine, MaxLine
  112.    CALL SUB "StrNB" ProcType St$
  113.    COLOR 14, 1
  114.    PRINT "Program Cursor: ";
  115.    COLOR 7, 1
  116.    IF Visible = 0 THEN
  117.        PRINT "Invisible ";
  118.    ELSE
  119.        PRINT "Visible (lines ";
  120.        CALL SUB "StrNB" StartLine St$
  121.        PRINT St$;
  122.        PRINT "-";
  123.        CALL SUB "StrNB" EndLine St$
  124.        PRINT St$;
  125.        PRINT ") ";
  126.    ENDIF
  127.    CALL SUB "StrNB" MaxLine
  128.    PRINT "- Max Line ";
  129.    PRINT St$
  130.  
  131.  
  132. REM  ----- Display BIOS date ------------------------------------------------
  133.  
  134.  
  135.    LOCATE 13, 2
  136.    CALL SUB "PCDate" PCDate$
  137.    COLOR 14, 1
  138.    PRINT "ROM BIOS date : ";
  139.    COLOR 7, 1
  140.    PRINT PCDate$
  141.  
  142.  
  143. REM  ----- Display port info ------------------------------------------------
  144.  
  145.  
  146.    LOCATE 14, 2
  147.    CALL SUB "CommPorts" CommPorts
  148.    COLOR 14, 1
  149.    PRINT "COM ports     : ";
  150.    COLOR 7, 1
  151.    CALL SUB "StrNB" CommPorts St$
  152.    PRINT St$
  153.  
  154.    LOCATE 15, 2
  155.    CALL SUB "PrtPorts" PrtPorts
  156.    COLOR 14, 1
  157.    PRINT "LPT ports     : ";
  158.    COLOR 7, 1
  159.    CALL SUB "StrNB" PrtPorts St$
  160.    PRINT St$
  161.  
  162. REM  ----- Tidy up ----------------------------------------------------------
  163.  
  164.  
  165.    LOCATE 18, 2
  166.